package com.yangguang.service.impl;

import com.yangguang.mapper.SchoolMapper;
import com.yangguang.pojo.School;
import com.yangguang.service.SchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SchoolServiceImpl implements SchoolService {
    @Autowired
    private SchoolMapper schoolMapper;
    @Override
    public boolean insertSchool(String schoolName, String address) {
         boolean flag=false;
        School school = new School(null, schoolName, address);
        int insert = schoolMapper.insert(school);
        if (insert>0){
            flag=true;
        }
        return flag;
    }
}
